<?php
    require "NewsDB.class.php";
    $rss = new NewsDB();
    $rss->download();
    $news = simplexml_load_file(NewsDB::FILE_NAME);
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru" lang="ru">
<head>
	<title>Новостная лента</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>

<h1>Последние новости</h1>
<?php
    foreach ($news->channel->item as $k => $v) {
        ?>
        <div>
            <h3><?=$v->title?></h3>
            <strong><?=$v->category?></strong>
            <br/>
            <i><?=$v->pubDate?></i>
            <p><?=$v->description?></p>
            <div><a href="#"><?=$v->link?></a></div>
        </div>
        <hr/>
        <?php
    }
?>
</body>
</html>